package skins
{
	import flash.display.Bitmap;
	
	import spark.primitives.BitmapImage;
	import spark.skins.mobile.ViewNavigatorApplicationSkin;
	
	[Bindable] public class MainApplicationSkin extends ViewNavigatorApplicationSkin
	{
		[Embed(source='bmdude.jpg')] public var dudeClass:Class;
		[Embed(source='bg_diamond.png')] public var diamondPlate:Class;
		
		public function MainApplicationSkin()
		{
			super();
		}

		/*override protected function drawBackground(uW:Number, uH:Number):void
		{
			super.drawBackground(uW,uH);
			graphics.beginBitmapFill(Bitmap(new diamondPlate()).bitmapData);
			graphics.lineStyle(0);
			graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
			graphics.endFill();	
		}*/
		
		override protected function childrenCreated():void{
			super.childrenCreated();
			var dude:BitmapImage = new BitmapImage();
			dude.fillMode = "scale";
			dude.scaleMode = "letterbox";
			dude.horizontalAlign = "center";
			dude.horizontalCenter = 0;
			dude.verticalAlign = "middle";
			dude.verticalCenter = 0;
			dude.source = new dudeClass();
			dude.percentHeight=100;
			dude.percentWidth=100;
			navigator.addElement(dude);
			navigator.actionBar.setStyle('skinClass',skins.ActionSkin);
		}
		
	}
}